<template>
  <div>
    <div id="container"></div>
  </div>
</template>

<script>
export default {
  mounted() {
    window.onLoad = function() {
      var map = new AMap.Map("container", {
        zoom: 13,
        viewMode: "3D",
        center: [110, 30]
      });
    };
    var url =
      "https://webapi.amap.com/maps?v=1.4.15&key=34bf8bef9e64bd0ee6be16f8aaf8685e&callback=onLoad";
    var jsapi = document.createElement("script");
    jsapi.charset = "utf-8";
    jsapi.src = url;
    document.head.appendChild(jsapi);
  }
};
</script>

<style lang="less" scoped>
#container {
  width: 500px;
  height: 500px;
}
</style>